import axios from '@/libs/api.request.js'

export const instalmentList = data =>{
  return axios.request({
    method:"get",
    url:"/api/instalment/payable/list",
  })
};


export const instalmentadd = data =>{
  return axios.request({
    method:"post",
    url:"/api/instalment/payable/add",
    data:data,
  })
};

export const instalmentedit = data =>{
  return axios.request({
    method:"put",
    url:"/api/instalment/payable/edit",
    data:data,
  })
};


export const updateTai = data =>{
  return axios.request({
    method:"put",
    url:"/api/instalment/payable/updateTai",
    data:data,
  })
};


//文件上传
export const uploadVoucher = data =>{
  return axios.request({
    method:"post",
    url:"/api/instalment/payable/uploadVoucher",
    data:data,
  })
};

//根据id查询分期施工队分期支付信息
export const instalmentSelect = data =>{
  return axios.request({
    method:"get",
    url:"/api/instalment/payable/" + data,
  })
};



export const findAllListById = data =>{
  return axios.request({
    method:"get",
    url:"/api/instalment/findAllListById",
    data:data
  })
};


export const getnfoById = instalmentId =>{
  return axios.request({
    method:"get",
    url:"/api/instalment/getnfoById/"+instalmentId,
  })
};

export const selectinstalmentState = instalmentState =>{
  return axios.request({
    method:"get",
    url:"/api/instalment/selectinstalmentState/"+instalmentState,
  })
};
